home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Serious Software / POV-Ray 3.1 / Scenes / animate / float3 / float3.pov < prev   
Encoding:
Text File  |  1998-03-01  |  1.3 KB  |  57 lines  |  [TEXT/POV3]

  1. // Persistence Of Vision raytracer version 3.1 sample file.
  2. // Demonstrates various new float math functions.
  3. // Animate this scene with clock values +ki0.0 to +kf1.0
  4.  
  5. global_settings { assumed_gamma 2.2 }
  6.  
  7. #declare K = clock*12-6;
  8. #declare L = mod(K,2);
  9. #declare M = div(K,2);
  10. #declare N = mod(K,3);
  11. #declare Oh = div(K,3);
  12.  
  13. #include "colors.inc"
  14.  
  15. #declare Rad=1/3;
  16. #declare TFudge=<-6,0,0.2>;
  17. #declare Font="cyrvetic.ttf"
  18.  
  19. camera {
  20.    location  <0, 0, -120>
  21.    direction <0, 0,  12>
  22.    look_at   <0, 0,   0>
  23. }
  24.  
  25. light_source { <5000, 10000, -20000> color White}
  26. plane { z, Rad hollow on pigment {checker color rgb <1,.8,.8> color rgb <1,1,.8>} }
  27.  
  28. union{
  29.  text{ttf Font concat("K=clock*12-6=",str(K,0,2)),0.1,0 translate TFudge}
  30.  sphere {<K,-0.5,0>,Rad}
  31.  pigment{Red} translate 4*y
  32. }
  33.  
  34. union{
  35.  text{ttf Font concat("L=mod(K,2)=",str(L,0,2)),0.1,0 translate TFudge}
  36.  sphere {<L,-0.5,0>,Rad}
  37.  pigment{Green} translate 2*y
  38. }
  39.  
  40. union{
  41.  text{ttf Font concat("M=div(K,2)=",str(M,0,2)),0.1,0 translate TFudge}
  42.  sphere {<M,-0.5,0>,Rad}
  43.  pigment{Blue} translate 0*y
  44. }
  45.  
  46. union{
  47.  text{ttf Font concat("N=mod(K,3)=",str(N,0,2)),0.1,0 translate TFudge}
  48.  sphere {<N,-0.5,0>,Rad}
  49.  pigment{Cyan} translate -2*y
  50. }
  51.  
  52. union{
  53.  text{ttf Font concat("O=div(K,3)=",str(Oh,0,2)),0.1,0 translate TFudge}
  54.  sphere {<Oh,-0.5,0>,Rad}
  55.  pigment{Magenta} translate -4*y
  56. }
  57.